# 队列的python实现
class myQueue:
    def __init__(self):
        self.__queueList=[]
    def enQueue(self,item):
        # 入队
        self.__queueList.append(item)
    def deQueue(self):
        # 出队
        return self.__queueList.pop(0)
    def QueueISEmpty(self):
        # 判断队列是否为空
        return self.__queueList==[]
    def QueueSize(self):
        return len(self.__queueList)

if __name__=="__main__":
    queue=myQueue()
    queue.enQueue(10)
    queue.enQueue(20)
    print("当前队列的长度：",queue.QueueSize())
    print("当前队列是否为空：",queue.QueueISEmpty())
    queue.enQueue(30)
    queue.enQueue(40)
    print(queue.deQueue())
    print(queue.deQueue())
    print(queue.deQueue())
    print(queue.deQueue())